﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using HamsterSimulator.Compiler;
using System.Windows.Forms;

namespace HamsterSimulator
{
    public static class UnitTests
    {
        public static void TestCompiler()
        {
            string code =
                "void main() {" +
                "Vor();" +
                "Vor();" +
                "Nimm();" +
                "LinksUm();" +
                "Vor();" +
                "Vor();" +
                "Nimm();" +
                "}";

            foreach (MethodInfo mi in CodeParser.GetMethods(code))
            {
                MessageBox.Show(mi.Name);
                if (mi.Name == "main")
                {
                    MethodBody mb = mi.GetMethodBody();
                }
            }

        }
    }
}
